package com.xiaoyu.base.app;

import android.content.Context;
import android.graphics.drawable.Drawable;
import androidx.core.content.ContextCompat;

public class AppContext {

    public static int getColor(int resId) {
        return ContextCompat.getColor(App.getInstance().getApplication(), resId);
    }

    public static Context getContext() {
        return App.getInstance().getApplication();
    }

    public static String getString(int resId) {
        return App.getInstance().getApplication().getString(resId);
    }

    public static String getString(int resId, Object... formatArgs) {
        return App.getInstance().getApplication().getString(resId, formatArgs);
    }

    public static Drawable getDrawable(int resId) {
        return App.getInstance().getApplication().getResources().getDrawable(resId);
    }
}
